package work1;

public class Breeder {
        public void method(Animal a){
                if(a instanceof Dog){
                        Dog dog = (Dog) a;
                        dog.drink();
                        dog.eat();
                        dog.swimMing();
                }else if(a instanceof Frog){
                        Frog f = (Frog) a;
                        f.drink();
                        f.eat();
                        f.swimMing();
                }else if(a instanceof Sheep){
                        Sheep s =(Sheep) a;
                        s.drink();
                        s.eat();
                }
        }
}
